Skip to content

Fix mobile input auto-zoom on iOS Safari#618

Merged
realproject7 merged 2 commits intomainfrom
task/612-mobile-input-zoom
Mar 27, 2026
Merged

Fix mobile input auto-zoom on iOS Safari#618
realproject7 merged 2 commits intomainfrom
task/612-mobile-input-zoom

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Fixes #612

  • Add maximumScale: 1 to the Next.js Viewport export in layout.tsx
  • Prevents iOS Safari from auto-zooming when focusing input/textarea elements

Test plan

  • iOS Safari: tapping an input field does not zoom the page
  • Desktop: no layout change
  • Build passes

🤖 Generated with Claude Code

Add maximumScale: 1 to viewport config to prevent iOS Safari from
zooming in when focusing input/textarea elements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 27, 2026 9:38pm

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The change is scoped correctly to layout.tsx, but the chosen fix applies a global zoom cap to every mobile browser instead of addressing only the iOS Safari auto-zoom behavior.

Findings

  • [high] maximumScale: 1 disables user zoom on browsers that honor the viewport limit, which turns an iOS input-focus annoyance into an accessibility regression for the whole app.
    • File: src/app/layout.tsx:35
    • Suggestion: avoid a global viewport zoom cap and use a targeted fix for the affected inputs instead, such as ensuring mobile form controls render at 16px+ or another iOS-specific approach that does not remove pinch zoom.

Decision

Requesting changes because this global viewport restriction is too broad for the bug being fixed and can break zoom accessibility on mobile browsers outside the original iOS Safari case.

Revert maximumScale: 1 which disabled pinch-to-zoom globally. Instead,
use @supports (-webkit-touch-callout: none) to target iOS Safari and
set font-size: max(16px, 1em) on input/textarea/select elements.
iOS only auto-zooms on inputs with font-size < 16px. Pinch-to-zoom
remains fully functional.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The PR now uses a targeted CSS workaround for the iOS Safari input auto-zoom trigger instead of a global viewport zoom cap.

Findings

  • None.

Decision

Approved because the updated fix addresses issue #612 without removing pinch-zoom for the whole app: src/app/globals.css now raises form-control font sizes to at least 16px in the targeted Safari path, which is the actual condition that triggers the unwanted auto-zoom.

@realproject7 realproject7 merged commit 923ce83 into main Mar 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix mobile input auto-zoom — add maximumScale: 1 to viewport

2 participants